<?php

namespace IDock\Insurance\ZMBX\Request;

use Exception;
use IDock\Insurance\ZMBX\Request\AllZMBXRequest;
use IDock\Insurance\ZMBX\Response\ProposalRecallResponse;
use IDock\Visitor\ProposalRecallVisitor;

class ProposalRecallRequest extends AllZMBXRequest
{
    protected $route = 'UnderwritingCancle.do';
    public $requestCode = 'UnderwritingCancle';

    protected $response = ProposalRecallResponse::class;

    protected $urlTip = '投保单撤回';

    /**
     * @var ProposalRecallVisitor $visitor
     */
    protected $visitor;

    /**
     * @return array
     * @throws Exception
     */
    public function generate(): array
    {
        $this->setZMBXToken($this->visitor->argc);
        return [
            'contractMainNo' => $this->visitor->inquiryNo,
        ];
    }
}
